﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

namespace Project_ScansiaPacific
{
    public partial class Fr_Report : DevComponents.DotNetBar.Office2007Form
    {
        public Fr_Report()
        {
            InitializeComponent();
        }
        public void report_NKLS(DataSet ds)
        {
           /* CrR_NKLS Cr_NKLS = new CrR_NKLS();
            Cr_NKLS.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = Cr_NKLS;
            crystalReportViewer1.Refresh();*/
        }
        public void report_NKXK(DataSet ds)
        {
            CrR_NKXK Cr_NKXK = new CrR_NKXK();
            Cr_NKXK.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = Cr_NKXK;
            crystalReportViewer1.Refresh();
        }
        public void report_QLNKXK(DataSet ds)
        {
            CrR_NKXK_QL Cr_NKXK = new CrR_NKXK_QL();
            Cr_NKXK.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = Cr_NKXK;
            crystalReportViewer1.Refresh();
        }
        public void report_XKSX(DataSet ds)
        {
            CrR_XKSX Cr_XKSX = new CrR_XKSX();
            Cr_XKSX.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = Cr_XKSX;
            crystalReportViewer1.Refresh();
        }
        public void report_XKLS(DataSet ds)
        {
            CrR_XKLS Cr_XKLS = new CrR_XKLS();
            Cr_XKLS.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = Cr_XKLS;
            crystalReportViewer1.Refresh();
        }
        public void report_XKBan(DataSet ds)
        {
            CrR_XKB Cr_XKBan = new CrR_XKB();
            Cr_XKBan.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = Cr_XKBan;
            crystalReportViewer1.Refresh();
        }
        public void report_XKGC(DataSet ds)
        {
            CrR_XKGC Cr_XKGC = new CrR_XKGC();
            Cr_XKGC.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = Cr_XKGC;
            crystalReportViewer1.Refresh();
        }
        public void report_TTSP(DataSet ds)
        {
            CrRTTSanPham CrSP = new CrRTTSanPham();
            CrSP.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrSP;
            crystalReportViewer1.Refresh();
        }
        public void report_KV2XP_Ngay(DataSet ds, string Ngaystart)
        {
            CrR_KV2XP_Ngay CrSP = new CrR_KV2XP_Ngay();
            CrSP.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrSP.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
           
            crystalReportViewer1.ReportSource = CrSP;
            crystalReportViewer1.Refresh();
        }
        public void report_KV2TDTD(DataSet ds)
        {
            CrR_KV2XP_CL CrTDTD = new CrR_KV2XP_CL();
            CrTDTD.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrTDTD;
            crystalReportViewer1.Refresh();
        }
        public void report_KV1XKTG(DataSet ds,string Ngay)
        {
            CrR_KV1XKTG CrXKTG = new CrR_KV1XKTG();
            CrXKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngay;
            pav1.Add(padv1);
            CrXKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrXKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KV1NKTG(DataSet ds,string Ngay)
        {
            CrR_KV1NKTG CrNKTG = new CrR_KV1NKTG();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngay;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTGTH(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KTGReportTH CrKTGTH = new CrR_KTGReportTH();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();
           
        }
        public void report_KTamTH(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KTamReportTH CrKTGTH = new CrR_KTamReportTH();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();
        }
        public void report_KV4XKTam(DataSet ds, string Ngay)
        {
            CrR_KV4XKTam CrXKTG = new CrR_KV4XKTam();
            CrXKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngay;
            pav1.Add(padv1);
            CrXKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrXKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KV4NKTam(DataSet ds, string Ngay)
        {
            CrR_KV4NKTam CrNKTG = new CrR_KV4NKTam();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngay;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_NKTP(DataSet ds, string Ngay)
        {
            CrR_NKTP CrNKTG = new CrR_NKTP();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngay;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_XKTP(DataSet ds, string Ngay)
        {
            CrR_XKTP CrNKTG = new CrR_XKTP();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngay;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPTH_Ngay(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KTPReportTH CrNKTG = new CrR_KTPReportTH();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrNKTG.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPTH_BB(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KTP_XKBB CrNKTG = new CrR_KTP_XKBB();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrNKTG.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPTHLyDo(DataSet ds,string DienGiai)
        {
            CrR_KTPReportLyDo CrNKTG = new CrR_KTPReportLyDo();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = DienGiai;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["DienGiai"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPTHNX_Tuan(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KTPReportTH_Tuan CrNKTG = new CrR_KTPReportTH_Tuan();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrNKTG.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
           
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPStatistic_Tuan(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KTPStatistic_Tuan CrNKTG = new CrR_KTPStatistic_Tuan();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrNKTG.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }

        public void report_TonLR(DataSet ds)
        {
            CrR_TonLR CrNKTG = new CrR_TonLR();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_TDKH_Nhung(DataSet ds)
        {
            CrR_TDKH_Nhung CrNKTG = new CrR_TDKH_Nhung();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_TDKH_NKTG(DataSet ds)
        {
            CrR_TDKH_NKTG CrNKTG = new CrR_TDKH_NKTG();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_TDKH_XKTG(DataSet ds)
        {
            CrR_TDKH_XKTG CrNKTG = new CrR_TDKH_XKTG();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_TDKH_DPKTG(DataSet ds)
        {
            CrR_TDKH_DPNKTG CrNKTG = new CrR_TDKH_DPNKTG();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTG_Pallet(DataSet ds)
        {
            CrR_PhieuPalletKV1 CrNKTG = new CrR_PhieuPalletKV1();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_NKPhieuPallet(DataSet ds)
        {
            CrR_KTG_NKPPallet CrNKTG = new CrR_KTG_NKPPallet();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_NKNhapKTG(DataSet ds,string Ngaystart)
        {
            CrR_KTG_NKNKTG CrNKTG = new CrR_KTG_NKNKTG();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["Ngay_Nhap"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTGTH_NhapXuat(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KTGNX_TK CrKTGTH = new CrR_KTGNX_TK();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();

        }
        public void report_KV2XP_CL(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KV2XP_CL CrKTGTH = new CrR_KV2XP_CL();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();

        }
        public void report_KTPXK(DataSet ds)
        {
            CrR_KTP_XK CrNKTG = new CrR_KTP_XK();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPNK(DataSet ds, string Ngaystart)
        {
            CrR_KTPNK CrNKTG = new CrR_KTPNK();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPXK_Ngay(DataSet ds, string Ngaystart)
        {
            CrR_KTPXK CrNKTG = new CrR_KTPXK();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPTX(DataSet ds)
        {
            CrR_KTPReportTX CrNKTG = new CrR_KTPReportTX();
            CrNKTG.SetDataSource(ds.Tables[0]);
           
            
          
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KTPKK(DataSet ds)
        {
            CrR_KTP_KKe CrNKTG = new CrR_KTP_KKe();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KV2_KTam(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KV2_KTam CrKTGTH = new CrR_KV2_KTam();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();

        }
        public void report_KhoGo_Nhap(DataSet ds, string Ngaystart)
        {
            CrR_KhoGo_Nhap CrNKTG = new CrR_KhoGo_Nhap();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["Ngay"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KhoGo_Xuat(DataSet ds, string Ngaystart)
        {
            CrR_KhoGo_Xuat CrNKTG = new CrR_KhoGo_Xuat();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["Ngay"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KhoGoTH(DataSet ds, string Ngaystart, string Ngayend,string NoiGiao,string NoiNhan)
        {
            CrR_KhoGoReportTH CrKTGTH = new CrR_KhoGoReportTH();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            ParameterValues pav3 = new ParameterValues();
            ParameterDiscreteValue padv3 = new ParameterDiscreteValue();
            padv3.Value = NoiGiao;
            pav3.Add(padv3);
            CrKTGTH.DataDefinition.ParameterFields["NoiGiao"].ApplyCurrentValues(pav3);
            ParameterValues pav4 = new ParameterValues();
            ParameterDiscreteValue padv4 = new ParameterDiscreteValue();
            padv4.Value = NoiNhan;
            pav4.Add(padv4);
            CrKTGTH.DataDefinition.ParameterFields["NoiNhan"].ApplyCurrentValues(pav4);

            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();

        }
        public void report_KhoGoNGN(DataSet ds, string Ngaystart, string Ngayend, string NoiGiao, string NoiNhan)
        {
            CrR_KhoGoReportNGN CrKTGTH = new CrR_KhoGoReportNGN();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
            ParameterValues pav3 = new ParameterValues();
            ParameterDiscreteValue padv3 = new ParameterDiscreteValue();
            padv3.Value = NoiGiao;
            pav3.Add(padv3);
            CrKTGTH.DataDefinition.ParameterFields["NoiGiao"].ApplyCurrentValues(pav3);
            ParameterValues pav4 = new ParameterValues();
            ParameterDiscreteValue padv4 = new ParameterDiscreteValue();
            padv4.Value = NoiNhan;
            pav4.Add(padv4);
            CrKTGTH.DataDefinition.ParameterFields["NoiNhan"].ApplyCurrentValues(pav4);

            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();

        }
        public void report_KHKV2XP(DataSet ds, string TieuDe)
        {
            CrR_TDKH_XP CrNKTG = new CrR_TDKH_XP();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = TieuDe;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["TDKeHoach"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KV2XLR(DataSet ds)
        {
            CrR_KV2_XLR CrNKTG = new CrR_KV2_XLR();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KV2XLR_TDKH(DataSet ds)
        {
            CrR_KV2XLR_TDKH CrNKTG = new CrR_KV2XLR_TDKH();
            CrNKTG.SetDataSource(ds.Tables[0]);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        private void Fr_Report_KeyDown(object sender, KeyEventArgs ex)
        {
            if (ex.KeyCode == Keys.Enter)
            {
                crystalReportViewer1.PrintReport();
            }
        }
        public void report_KV2XLR_Ngay(DataSet ds, string Ngaystart)
        {
            CrR_KV2XLR_Ngay CrNKTG = new CrR_KV2XLR_Ngay();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KV2XLR_TH(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KV2XLRReportTH CrKTGTH = new CrR_KV2XLRReportTH();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);
           

            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();

        }
        public void report_KV2XLR_BS(DataSet ds, string Ngaystart, string Ngayend)
        {
            CrR_KV2XLR_BS CrKTGTH = new CrR_KV2XLR_BS();
            CrKTGTH.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrKTGTH.DataDefinition.ParameterFields["Ngaystart"].ApplyCurrentValues(pav1);
            ParameterValues pav2 = new ParameterValues();
            ParameterDiscreteValue padv2 = new ParameterDiscreteValue();
            padv2.Value = Ngayend;
            pav2.Add(padv2);
            CrKTGTH.DataDefinition.ParameterFields["Ngayend"].ApplyCurrentValues(pav2);


            crystalReportViewer1.ReportSource = CrKTGTH;
            crystalReportViewer1.Refresh();

        }
        public void report_KV1_CTUT(DataSet ds)
        {
            CrR_KV1_CTUuTien CrNKTG = new CrR_KV1_CTUuTien();
            CrNKTG.SetDataSource(ds.Tables[0]);
           
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KV1_KHLP(DataSet ds, string Ngaystart)
        {
            CrR_KV1_KHLP CrNKTG = new CrR_KV1_KHLP();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngaystart;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["SoKH"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void report_KV4Verni(DataSet ds, string Ngay)
        {
            CrR_KV4Verni CrNKTG = new CrR_KV4Verni();
            CrNKTG.SetDataSource(ds.Tables[0]);
            ParameterValues pav1 = new ParameterValues();
            ParameterDiscreteValue padv1 = new ParameterDiscreteValue();
            padv1.Value = Ngay;
            pav1.Add(padv1);
            CrNKTG.DataDefinition.ParameterFields["NgayReport"].ApplyCurrentValues(pav1);
            crystalReportViewer1.ReportSource = CrNKTG;
            crystalReportViewer1.Refresh();
        }
        public void KV4XKTam(DataSet ds)
        {
            CrR_KV4XK CrXKTG = new CrR_KV4XK();
            CrXKTG.SetDataSource(ds.Tables[0]);
            
            crystalReportViewer1.ReportSource = CrXKTG;
            crystalReportViewer1.Refresh();
        }
    }
}
